
        <ol class="breadcrumb">
          <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;{{lang('dashboard')}}</a></li>
          <li class="active">{{lang('trade')}}</li>
        </ol>          
       <hr>
       <div>
       <a class="btn btn-primary" href="{{$this->Html->url(array('action'=>'add'))}}">{{lang('new_trade_product')}}</a>
       </div>
		
    <table class="table table-striped table-hover">
    <?php
        $tableHeaders =  $this->Html->tableHeaders(array(
            lang('coverimg'),
            lang('name'),
            lang('price'),
            lang('created'),
            lang('on_sale'),
            lang('opration'),
        ));

        echo '<thead>'.$tableHeaders.'</thead>';

        $rows = array();
        foreach ($datalist AS $item) {
            $actions = ' ' . $this->Html->link(lang('edit'), array('controller'=>'Trades','action' => 'edit', $item['Trade']['id']));
			
            $rows[] = array(
                $this->Html->image(
		$this->Html->url($item['Trade']['coverimg']),
array('style'=>'max-width:100px;max-height:100px;')),
                $item['Trade']['name'],
				$item['Trade']['price'],
                substr($item['Trade']['created'],5,11),
				$item['Trade']['published'],
                $actions,
            );
        }
        echo $this->Html->tableCells($rows);

		echo '<thead>'.$tableHeaders.'</thead>';
    ?>
    </table>
    {{$page_navi}}